#import numpy as np
#import pandas as pd
import numpy as np
import pandas as pd

#s = pd.Series([1, 2, 3, np.nan,3,4,5,5,5,5,np.nan,np.nan,6,6,7,12,np.nan,3,3])
#平均值填充
#U = s.mean()  #计算平均值
#print(U)
#s.fillna(U,inplace=True)
#print(s)
#s = pd.Series([1,2,3,np.nan,3,4,5,5,5,5,np.nan,np.nan,6,6,7,12,22,np.nan,3,3])
#中位数填充
#me = s.median()  #计算中位数
#print(me)
#s.fillna(me,inplace=True)
#print(s)

s = pd.Series([1, 2, 3, np.nan,3,4,5,5,5,5,np.nan,np.nan,6,6,7,12,np.nan,3,3])